import java.util.Random;

public class luanxu_arr {
    public static void main(String[] args) {
        //定义一个数组，存入1-5，打乱原有顺序
        int [] arr={1,2,3,4,5};
        for (int i = 0; i < arr.length; i++) {
            Random r=new Random();
            int rIndex=r.nextInt(arr.length);
            int temp=arr[rIndex];
            arr[rIndex]=arr[i];
            arr[i]=temp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

    }
}
